248 research outputs found
Transformations of Logic Programs with Goals as Arguments
We consider a simple extension of logic programming where variables may range
over goals and goals may be arguments of predicates. In this language we can
write logic programs which use goals as data. We give practical evidence that,
by exploiting this capability when transforming programs, we can improve
program efficiency.
We propose a set of program transformation rules which extend the familiar
unfolding and folding rules and allow us to manipulate clauses with goals which
occur as arguments of predicates. In order to prove the correctness of these
transformation rules, we formally define the operational semantics of our
extended logic programming language. This semantics is a simple variant of
LD-resolution. When suitable conditions are satisfied this semantics agrees
with LD-resolution and, thus, the programs written in our extended language can
be run by ordinary Prolog systems.
Our transformation rules are shown to preserve the operational semantics and
termination.Comment: 51 pages. Full version of a paper that will appear in Theory and
Practice of Logic Programming, Cambridge University Press, U
Transformation Rules for Locally Stratified Constraint Logic Programs
We propose a set of transformation rules for constraint logic programs with
negation. We assume that every program is locally stratified and, thus, it has
a unique perfect model. We give sufficient conditions which ensure that the
proposed set of transformation rules preserves the perfect model of the
programs. Our rules extend in some respects the rules for logic programs and
constraint logic programs already considered in the literature and, in
particular, they include a rule for unfolding a clause with respect to a
negative literal.Comment: To appear in: M. Bruynooghe, K.-K. Lau (Eds.) Program Development in
Computational Logic, Lecture Notes in Computer Science, Springe
Folding Transformation Rules for Constraint Logic Programs
We consider the folding transformation rule for constraint
logic programs. We propose an algorithm for applying the folding rule in the case where the constraints are linear equations and inequations over the rational or the real numbers. Basically, our algorithm consists in reducing a rule application to the solution of one or more systems
of linear equations and inequations. We also introduce two variants of the folding transformation rule. The first variant combines the folding rule with the clause splitting rule, and the second variant eliminates the existential variables of a clause, that is, those variables which occur in the body of the clause and not in its head. Finally, we present the algorithms for applying these variants of the folding rule
Program Transformation for Development, Verification, and Synthesis of Software
In this paper we briefly describe the use of the program transformation methodology for the development of correct
and efficient programs. We will consider, in particular,
the case of the transformation and the development of constraint logic programs
Transformational Verification of Linear Temporal Logic
We present a new method for verifying Linear Temporal
Logic (LTL) properties of finite state reactive systems based on logic programming and program transformation. We encode a finite state system and an LTL property which we want to verify as a logic program on infinite lists. Then we apply a verification method consisting of two steps. In the first step we transform the logic program that encodes the given system and the given property into a new program belonging to the class of the so-called linear monadic !-programs (which are stratified, linear recursive programs defining nullary predicates or unary predicates on infinite lists). This transformation is performed by applying rules that preserve correctness. In the second step we verify the property of interest by using suitable proof rules for linear monadic !-programs. These proof rules can be encoded as a logic program which always terminates, if evaluated by using tabled resolution. Although our method uses standard
program transformation techniques, the computational complexity of the derived verification algorithm is essentially the same as the one of the Lichtenstein-Pnueli algorithm [9], which uses sophisticated ad-hoc techniques
Program transformation for development, verification, and synthesis of programs
This paper briefly describes the use of the program transformation methodology for the development of correct and efficient programs. In particular, we will refer to the case of constraint logic programs and, through some examples, we will show how by program transformation, one can improve, synthesize, and verify programs
Generalization Strategies for the Verification of Infinite State Systems
We present a method for the automated verification of temporal properties of
infinite state systems. Our verification method is based on the specialization
of constraint logic programs (CLP) and works in two phases: (1) in the first
phase, a CLP specification of an infinite state system is specialized with
respect to the initial state of the system and the temporal property to be
verified, and (2) in the second phase, the specialized program is evaluated by
using a bottom-up strategy. The effectiveness of the method strongly depends on
the generalization strategy which is applied during the program specialization
phase. We consider several generalization strategies obtained by combining
techniques already known in the field of program analysis and program
transformation, and we also introduce some new strategies. Then, through many
verification experiments, we evaluate the effectiveness of the generalization
strategies we have considered. Finally, we compare the implementation of our
specialization-based verification method to other constraint-based model
checking tools. The experimental results show that our method is competitive
with the methods used by those other tools. To appear in Theory and Practice of
Logic Programming (TPLP).Comment: 24 pages, 2 figures, 5 table
Proving theorems by program transformation
In this paper we present an overview of the unfold/fold proof method, a method for proving theorems about programs, based on program transformation. As a metalanguage for specifying programs and program properties we adopt constraint logic programming (CLP), and we present a set of transformation rules (including the familiar unfolding and folding rules) which preserve the semantics of CLP programs. Then, we show how program transformation strategies can be used, similarly to theorem proving tactics, for guiding the application of the transformation rules and inferring the properties to be proved. We work out three examples: (i) the proof of predicate equivalences, applied to the verification of equality between CCS processes, (ii) the proof of first order formulas via an extension of the quantifier elimination method, and (iii) the proof of temporal properties of infinite state concurrent systems, by using a transformation strategy that performs program specialization
- ā¦